import Vue from 'vue'
import Router from 'vue-router'

import Main from '../pages/Main.vue'
import Device from '../pages/device/Device.vue'
import Video from '../pages/device/Video.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '',
      redirect: '/main/device'
    },
    {
        path: '/main',
        name: 'Main',
        component: Main,
        children: [
          {
            path: 'device',
            name: 'Device',
            component: Device
          },
          {
            path: 'video',
            name: 'Video',
            component: Video
          }
        ]
    }
  ]
})
